package urpc

import "errors"

// --------------------- CmdArgs cmd exec相关 ---------------------
type CmdArgs struct {
	Id 		string
	TaskId 		string
	Cmd 		string
	Params 		string
	TimeOut 	int
}

// CmdReply 返回的结果
type CmdReply struct {
	TaskId 			string
	Input 			string
	Result			string
	Status 			int
}

// --------------------- WeaponMsgArgs weapon执行相关 ---------------------
type WeaponMsgArgs struct {
	Id	 			string
	TaskId 			string

	WeaponId 		int
	WeaponName 		string
	WeaponMd5 		string
	WeaponUrl 		string
	WeaponType 		int

	Timeout 		int
	Params 			string
}

type WeaponMsgReply struct {

}


// --------------------- ServerInfoArgs 参数 ---------------------
type ServerInfoArgs struct {
}

// ServerInfoReply 结果
type ServerInfoReply struct {
	Domain 			string
	TCPPort 		int
	HTTPPort 		int
	Version 		int
	Status 			int
}

// --------------------- get all online status 操作 ---------------------
type AllOnlineArgs struct {

}

type AllOnlineReply struct {
	Hosts 		[]OneOnlineReply
}

// --------------------- get one online status 操作 ---------------------
var NoOnlineAgentErr = errors.New("no this id host on line")
type OneOnlineArgs struct {
	Id 		string
}

type OneOnlineReply struct {
	IP 			string
	Id 		string
	Version 	string
	Pid 		string
}

// --------------------- one ping 操作 ---------------------
type OnePingArgs struct {
	IP 			string
}

type OnePingReply struct {
	IP 			string
	Ok  		bool
	Msg 		string
}

// --------------------- Auto config module ---------------------
type AutoConfigArgs struct {
	AgentID 		string
	AgentIP 		string
	NotifyType 		int
	PayLoad 		[]byte
}

type AutoConfigReply struct {

}